A wireless light communications technology is also called visible light communication, which uses frequent flash of an LED light source to communicate. Presence of light represents 1, and absence of light represents 0, and a transmission rate in the visible light communication is up to 1000 Mbps per second. The wireless light communication performs data transmission by using visible light. Compared with a microwave technology, the wireless light communication has relatively rich spectrum resources, with which general microwave communication and wireless communication are incomparable. In addition, the visible light communication is compatible with any communication protocol and applicable to any environment. In terms of security, the visible light communication is free from theft of communication content. A wireless light communication device is flexible, portable, cost-efficient, and suitable for massive popularized application.
In the prior art, a mobile terminal such as a mobile phone performs visible light communication by controlling flashing of an LED flash. However, when controlling on and off states of the LED flash, delay occurs randomly, and on and off duration of the LED flash cannot be controlled precisely. Consequently, in an application of the mobile terminal such as a mobile phone, the LED flash works unstabitily when the LED flash is in a flashing state, which leads to errors in an optical signal transmission process.
With respect to receiving and decoding, a quantity of high levels denotes a signal in encoding currently. Duration of each high level is about 2 ms, and each group of levels includes at most four high levels. A quantity of levels in each group denotes a 2-bit signal. Because both a high level and a low level have a delay, a receive end may decode a received signal by detecting delays of a high level and a low level on an I/O pin of a single-chip microcomputer of the receive end.
A decoding method corresponding to the foregoing conventional encoding method needs to output and detect many high levels, which leads to signal instability. In addition, an overall sending time and an overall receiving time of a signal are long, and data transmission is slow.